home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / win / steph1b0.zip / EDITFN.H < prev    next >
C/C++ Source or Header  |  1994-09-24  |  2KB  |  92 lines

  1. /* EDITFN.H */
  2.  
  3. /* Editor functions include file for EDITFN.C. */
  4. /* Text editor functions designed for use with Steph. */
  5.  
  6. /* by Stephen Morphet, 1994. */
  7.  
  8. #define NO_WRAP -1
  9.  
  10. #define TABSIZE 3
  11.  
  12. #define SMALL_SCROLL 1
  13. #define BIG_SCROLL 20
  14.  
  15. #define CHARMAX 256
  16.  
  17. #define NEWLINE   -1
  18. #define NONEWLINE 0
  19. #define AT_END    1
  20.  
  21. /* window contents endcodes */
  22. #define NOEND      0
  23. #define ENDPARA   1
  24. #define ENDDOC    2
  25. #define LONGWRAP   3
  26.  
  27.  
  28. #define ewi _editor_spec.info[_window_spec.active]
  29.  
  30.  
  31. struct __editwininfo
  32. {
  33.     int csr_x;                /* x position zero based */
  34.     int csr_y;                /* y position zero based */
  35. };
  36.  
  37. struct __ed_data
  38. {
  39.     struct __editwininfo info[__MAXWINDOWS];
  40.                                 /* struct holding csr pos in each win */
  41.  
  42.     int sel_win;    /* window that has the highlight, -1 for none. */
  43.  
  44.     unsigned sel_line;
  45.     unsigned end_line;    /* start and end lines of highlight */
  46.  
  47.     unsigned sel_char;
  48.     unsigned end_char;    /* start and end characters of highlight */
  49.  
  50.  
  51. }_editor_spec;
  52.  
  53.  
  54. /* functions */
  55.  
  56. void editor_initialise( void );
  57.  
  58. void fix_x_cursor( void );
  59. void fix_lineo( void );
  60. void fix_charo( void );
  61.  
  62. void editor_mouse_select( void );
  63. void editor_mouse_unselect( void );
  64. void editor_mouse_minimise( void );
  65. void editor_mouse_maximise( void );
  66. void editor_mouse_resize( void );
  67. void editor_mouse_activate( void );
  68.  
  69. void ems_left( void );
  70. void ems_right( void );
  71. void ems_pleft( void );
  72. void ems_pright( void );
  73. void ems_hdrag( void );
  74.  
  75. void ems_up( void );
  76. void ems_down( void );
  77. void ems_pup( void );
  78. void ems_pdown( void );
  79. void ems_vdrag( void );
  80.  
  81. void editor_filter( void );
  82. void editor_action( void );
  83.  
  84. void _ed_pg_up( int *cxp, int *cyp );
  85. void _ed_pg_down( int *cxp, int *cyp );
  86.  
  87. void ed_put_cursor( unsigned win );
  88.  
  89.  
  90. char *_ed_makebuffer( unsigned win );
  91. int _ed_readfile( unsigned win, char *fname );
  92.